package com.example.helloandroid;


public class MemLeakTest {
    MemTest memTest1, memTest2;

    public void DoLeakTest() {
        memTest1 = new MemTest();
        memTest1.PrintInner();
        memTest1 = null;
        memTest2 = new MemTest();
        memTest2.PrintInner();

        System.gc();
	}
}

class MemTest {
    public static InnerC m_inner = null;

    MemTest() {
        m_inner = new InnerC();
    }

    public class InnerC {
        void Print() {
            System.out.print(MemTest.this);
        }
    }

    void PrintInner() {
        m_inner.Print();
    }
}
